home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / Reference / Includes_and_Autodocs_3.5 / include / devices / timer.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-10-20  |  886 b   |  51 lines

  1. #ifndef DEVICES_TIMER_H
  2. #define DEVICES_TIMER_H 1
  3. /*
  4. **    $VER: timer.h 36.16 (25.1.1991)
  5. **    Includes Release 44.1
  6. **
  7. **    Timer device name and useful definitions.
  8. **
  9. **    (C) Copyright 1985-1999 Amiga, Inc.
  10. **        All Rights Reserved
  11. */
  12.  
  13. #ifndef EXEC_TYPES_H
  14. #include <exec/types.h>
  15. #endif
  16.  
  17. #ifndef EXEC_IO_H
  18. #include <exec/io.h>
  19. #endif
  20.  
  21. /* unit defintions */
  22. #define UNIT_MICROHZ    0
  23. #define UNIT_VBLANK    1
  24. #define UNIT_ECLOCK    2
  25. #define UNIT_WAITUNTIL    3
  26. #define    UNIT_WAITECLOCK    4
  27.  
  28. #define TIMERNAME    "timer.device"
  29.  
  30. struct timeval {
  31.     ULONG tv_secs;
  32.     ULONG tv_micro;
  33. };
  34.  
  35. struct EClockVal {
  36.     ULONG ev_hi;
  37.     ULONG ev_lo;
  38. };
  39.  
  40. struct timerequest {
  41.     struct IORequest tr_node;
  42.     struct timeval tr_time;
  43. };
  44.  
  45. /* IO_COMMAND to use for adding a timer */
  46. #define TR_ADDREQUEST    CMD_NONSTD
  47. #define TR_GETSYSTIME    (CMD_NONSTD+1)
  48. #define TR_SETSYSTIME    (CMD_NONSTD+2)
  49.  
  50. #endif /* DEVICES_TIMER_H */
  51.